import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import RightBar from '../component/rightBar/RightBar';
import { filterTagFuc } from '../actions/filterTags';

class RightBarContainer extends React.Component {

  render() {
    return (
      <RightBar
        {...this.props}
      />
    );
  }
}

function mapStateToProps(state) {
  const { folderTree, jsonTree, filterTag } = state.main;
  return {
    folderTree,
    jsonTree,
    filterTag,
  };
}

function mapDispatchToProps(dispatch) {
  return bindActionCreators({
    filterTagFuc,
  }, dispatch);
}

export default connect(mapStateToProps, mapDispatchToProps)(RightBarContainer);
